home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1993 February / 1993-02.d64 / ezee design (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  32KB  |  1,038 lines

  1. 5 rem copyright 1993 compute publications intl ltd - all rights reserved
  2. 10 print"[147]"
  3. 20 dimx(40):gosub10270 
  4. 30 poke 53280,15:poke 53281,9
  5. 40 a$="[158][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]"
  6. 50 b$="[158][166]                              [166]"
  7. 60 print ""a$:for b=1 to 18
  8. 70 print b$:next b
  9. 80 print "[145]"a$
  10. 90 print tab(12)"[145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][158][161][172][162][146][190]            "
  11. 100 print tab(12)"[158][161][188][146][187] [188][162] [146][190][172][172][187][146][187][172][172][187][146][187]"
  12. 110 print tab(12)"[158][161][146][161]   [190][146][190] [161][172][162][146][190][161][172][162][146][190]"
  13. 120 print tab(12)"[158][190]  [188][190]  [188][146][162]  [146][162][162]  [146][162]":print
  14. 130 print tab(8)"[158][161][172][188][146]          [172][187]         "
  15. 140 print tab(8)"[158][161][146][161][161][146][161][172][172][187][146][187][172][172][162][146][190] [162][187] [172][172][187][146][161][161][172][187][146][187]"
  16. 150 print tab(8)"[158][161][146][161][190][146][190][161][172][162][146][190] [162][187][146][187] [161][146][161] [188][188][190][146][161][161][146][161][161][146][161]"
  17. 160 print tab(8)"[158][190] [188][146][162][162]  [146][162][190]  [146][162][162]  [146][162][162][162][190][146][191][190][188][190][188][146]"
  18. 170 print                          
  19. 180 printtab(16)"(c) 1993":printtab(9)" compute publications
  20. 190 [153] [163]12)"sysby  frank kirsch":[153]
  21. 200 [133]"sysinstructions y/n";v$
  22. 210 [139] v$[178]"n"[137]610 
  23. 220 [153]"load"
  24. 230 [151] 53280,1:[151] 53281,1
  25. 240 [153] [163]10)"electronic formulae"
  26. 250 [153] [163]10)"usrusrusrusrusrusrusrusrusrusr usrusrusrusrusrusrusrusr"
  27. 260 [153][163]8)"verify"s1$;s3$;s2$ :[153]
  28. 270 [143] written by frank c. kirsch  may 10,1987. revised april 18,1991
  29. 280 [153]"poke  the program consists of equation sets"
  30. 290 [153]"associated with electronic problems."
  31. 300 [153]"to select an equation set, enter the    number indicated on the menu.
  32. 310 print"  for those equation sets which require"
  33. 320 print"a zero entry for the unknown value, "
  34. 330 print"zero is used to reset that variable and"
  35. 340 print"informs the computer which equation in"
  36. 350 print"the set to select. enter a zero       "
  37. 360 print"by pressing the return key at the input prompt for the unknown value."
  38. 370 print"[151]  other equations will require all of"
  39. 380 print"the inputs indicated in the instructionsfor each set."
  40. 390 print"  the quantities which may be solved"
  41. 400 print"are shown in parentheses on the menu."
  42. 410 print:printtab(12)"(press any key)"
  43. 420 get h$:if h$="" then420 
  44. 430 print"[147]":print:print:print
  45. 440 print"[151]  when entering data, it is important to"
  46. 450 print"[145]enter values correctly. for example, if"
  47. 460 print"the computer requests capacitance in"
  48. 470 print"farads and the value to be entered is"
  49. 480 print".05mfd, this should be entered as    "
  50. 490 print".00000005 farad or .05e-6 if using      exponential entry."
  51. 500 :print
  52. 510 print"  for convenience, the computer readout"
  53. 520 print"will often be in multiple values such "
  54. 530 print"as hertz, kilohertz, and megahertz .":print
  55. 540 print"  after completing an equation, the"
  56. 550 print"user has the option of repeating the"
  57. 560 print"set, returning to the menu, or skipping"
  58. 570 print"directly to another equation set and"
  59. 580 print"bypassing the menu.":print:print
  60. 590 print:print tab(12)"(press any key)"
  61. 600 get h$:if h$="" then600 
  62. 610 print"[147]":   poke 53280,1:poke 53281,1
  63. 620 print tab(8)"------enter number------":print
  64. 630 print"capacitor--charge/energy---(q,c,e,w)=1"
  65. 640 print"capacitor--plate---------(k,c,s,n,d)=2"
  66. 650 print"capacitor--reactance--------(xc,f,c)=3"
  67. 660 print"capacitors--in series-----(c1,c2.ct)=4"
  68. 670 print"capacitors-parallel-------------(ct)=5"
  69. 680 print"capacitor--time constant-----(c,r,t)=6":print
  70. 690 print"[152]coil-rf air single layer----(#1 l,n)=7"
  71. 700 print"coil-rf/specify wire ga.-(#2 n,lgth)=8":print
  72. 710 print"db,watts,volts,or amps----(db,w,e,i)=9":print
  73. 720 print"[152]frequency--resonant---------(fr,l,c)=10"
  74. 730 print"frequency, wavelength, period"
  75. 740 print" of sinewave-----------------(f,w,t)=11":print
  76. 750 print"impedance--parallel-----(#1 xc,xl,r)=12"
  77. 760 print"impedance--parallel-----(#2 r,z1,zt)=13"
  78. 770 print"impedance--series-------(#1 xc,xl,r)=14"
  79. 780 print"impedance--series-------(#2 r,z1,zt)=15":print
  80. 790 print"return for page #2.             page #1"
  81. 800 input"equation set no.";eq
  82. 810 print:print:print"[151]"
  83. 820 if eq>27 then800
  84. 830 if eq>0 then1040
  85. 840 print tab(8)"------enter number------":print
  86. 850 print"impedance--series/parallel"
  87. 860 print" using----------------(rl,xl//rc,xc)=16":print
  88. 870 print"[152]inductors--parallel-------(l1,l2,lt)=17"
  89. 880 print"inductors--series---------------(lt)=18"
  90. 890 print"inductor--reactance---------(xl,f,l)=19"
  91. 900 print"inductor--time constant------(l,r,t)=20":print
  92. 910 print"ohms law--(ac)---------------(i,e,z)=21"
  93. 920 print"ohms law--(dc)---------------(i,e,r)=22":print
  94. 930 print"[152]peak,peak/peak,avg.& rms conversions=23":print
  95. 940 print"resistance--parallel------(r1,r2,rt)=24"
  96. 950 print"resistance--series--------------(rt)=25"
  97. 960 print"resistor color code-----(ohms/color)=26":print
  98. 970 print"[152]simultaneous equations--------------=27"
  99. 980 print:print:print
  100. 990 print"return for page #1.             page #2"
  101. 1000 input"equation set no.";eq
  102. 1010 print"[151]"
  103. 1020 if eq<1 then620
  104. 1030 if eq>27 then1000 
  105. 1040 on eq goto5050 ,3020,2270,2860,7360,1440,5610,6220,8480,1750,5200,3980,6570
  106. 1050 z=eq-13
  107. 1060 on z goto3510,6880,4530,2700,8330,2020,1600,5450,1330,1090,2550,7210,7510
  108. 1070 z1=eq-26
  109. 1080 on z1 goto9090 
  110. 1090 print"[147]":gosub10270 
  111. 1100 print"peak,peak/peak,avg. and rms values for"
  112. 1110 print"[183][183][183][183][160][183][183][183][183][183][183][183][183][183] [183][183][183][183] [183][183][183] [183][183][183] [183][183][183][183][183][183] [183][183][183]"
  113. 1120 print tab(4)"sine wave voltage or currents."
  114. 1130 print tab(4)"[183][183][183][183][160][183][183][183][183][160][183][183][183][183][183][183][183][160][183][183][160][183][183][183][183][183][183][183][183][183]"
  115. 1140 print"enter known i or e value at the proper  input,enter a zero for all others."
  116. 1150 print
  117. 1160 input "[151]peak(i or e)       =";b
  118. 1170 input "peak/peak(i or e)  =";pp
  119. 1180 input "average(i or e)    =";a
  120. 1190 input "rms(i or e)        =";r:print
  121. 1200 if b>0 goto1260 
  122. 1210 if pp>0 then b=pp/2:goto1260 
  123. 1220 if a>0 then b=a/.637:goto1260 
  124. 1230 if r>0 then b=r/.707:goto1260 
  125. 1240 if b+pp+a+r=0 then gosub9980 
  126. 1250 goto1090 
  127. 1260 p=b:pp=2*b:a=.637*b:r=.707*b
  128. 1270 print "[151]peak(i or e)        =";b:print
  129. 1280 print "peak to peak(i or e)=";pp:print:print "avg.(i or e)        =";a:print
  130. 1290 print "rms(i or e)         =";r:print:print
  131. 1300 gosub9840
  132. 1310 if c$="r" then1090 
  133. 1320 goto6150 
  134. 1330 print"[147]":gosub10270 
  135. 1340 print tab(14)"ohms law dc"
  136. 1350 print tab(14)"[183][183][183][183] [183][183][183] [183][183]":print
  137. 1360 print"input a zero for either i,e, or r.":print"[151]"
  138. 1370 input "i(amps)";a:input "e(volts)";b:input "r(ohms)";c
  139. 1380 gosub9870 :if er=1 then goto1330 
  140. 1390 w=a*b:print:print
  141. 1400 print"amps =";a:print:print"volts =";b:print
  142. 1410 print"ohms=";c:print:print"watts =";w:print:gosub9840
  143. 1420 if c$="r" then1330 
  144. 1430 goto6150 
  145. 1440 print"[147]":gosub10270 
  146. 1450 print tab(10)"rc time constants"
  147. 1460 print tab(10)"[183][183] [183][183][183][183] [183][183][183][183][183][183][183][183][183]":print
  148. 1470 print"input a zero for either t, c, or r.":print:print"[151]"
  149. 1480 input "t(seconds)";b:input "c(farads)";c:input "r(ohms)";a
  150. 1490 z1$="charge":z2$="discharge"
  151. 1500 gosub9870
  152. 1510 print"[147]"
  153. 1520 print"[149]second=";b,"farad=";c:print"ohms=";a
  154. 1530 print"[149]milsec=";b*10^3,"mfd=";c*10^6:print"kilohms=";a/10^3
  155. 1540 print"[149]mic.sec=";b*10^6,"pf.=";c*10^12:print"megohm=";a/10^6:print
  156. 1550 a=b
  157. 1560 gosub10000
  158. 1570 gosub9840
  159. 1580 if c$="r" then1440 
  160. 1590 goto6150 
  161. 1600 print"[147]":gosub10